home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 July / macformat52.iso / mac / Shareware Plus / Developers / YAAF v1.0 alpha 1 / (Tools) / CompileVRes / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-14  |  1.0 KB  |  53 lines

  1. /*    main.c
  2.  *
  3.  *        This parses my internal language for specifying how views
  4.  *    are constructed
  5.  */
  6.  
  7. #ifdef macintosh
  8. #include <console.h>
  9. #endif
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include "viewformat.h"
  14.  
  15. /************************************************************************/
  16. /*                                                                        */
  17. /*    Globals                                                                */
  18. /*                                                                        */
  19. /************************************************************************/
  20.  
  21. int        GFileFormat;
  22.  
  23. /************************************************************************/
  24. /*                                                                        */
  25. /*    Main entry point                                                    */
  26. /*                                                                        */
  27. /************************************************************************/
  28.  
  29. int main(int argc, char **argv)
  30. {
  31.     int i;
  32.     
  33. #ifdef macintosh
  34.     argc = ccommand(&argv);
  35. #endif
  36.  
  37.     if (argc != 2) {
  38.         printf("Usage:  compilevres <file>\n");
  39.         return -1;
  40.     }
  41.     
  42.     printf("Parsing '%s' [macintosh]\n",argv[1]);
  43.     GFileFormat = 0;
  44.     ParseFile(argv[1]);
  45.     
  46.     printf("Parsing '%s' [windows]\n",argv[1]);
  47.     GFileFormat = 1;
  48.     ParseFile(argv[1]);
  49.     
  50.     printf("Done.\n");
  51.     return 0;
  52. }
  53.